VtPushButton


Create a PushButton widget

Syntax

VtPushButton object_name [options]

Description

Creates a PushButton. Label class options are used to label the button. Returns the PushButton widget name.

Options

-callback cmd (C)
Sets the callback to call when you press the PushButton.

Additional callback keys

clickCount
Number of multi-clicks pressed inside a button. This is used to detect double or triple click events inside a PushButton.

value
Contains the PushButton's label string.

-armedPixmap pixmap_file (CS)
Sets the pixmap file to use for the armed pixmap. The armed pixmap is displayed when you press the PushButton.

Example

The following code produces four PushButtons.

set app [VtOpen PushButtons]

set form [VtFormDialog $app.form -title "VtPushButton Demo" ]

VtPushButton $form.but1 \
	-leftSide FORM \
	-rightSide FORM \
	-label "Apples"      

VtPushButton $form.but2 \
	-leftSide FORM \
	-rightSide FORM \
	-label "Oranges"

VtPushButton $form.but3 \
	-leftSide FORM \
	-rightSide FORM \
	-label "Bananas"

VtPushButton $form.but4 \
	-leftSide FORM \
	-rightSide FORM \
	-label "Kumquats"

VtShow $form
VtMainLoop

This code produces the following:

See also: